package cn.hackcloud.concurrency.eda.chat;

import cn.hackcloud.concurrency.eda.AsyncChannel;
import cn.hackcloud.concurrency.eda.Event;

/**
 * 用户上线的Event，打印用户登陆日志
 */
public class UserOnlineEventChannel extends AsyncChannel {
    @Override
    protected void handle(Event message) {
        UserOnlineEvent event = (UserOnlineEvent) message;
        System.out.println("The User " + event.getUser().getName() + " is Online.");
    }
}
